package com.fy.fyzf.presenter;

import com.fy.fyzf.api.SubscriberCallBack;
import com.fy.fyzf.base.BasePresenter;
import com.fy.fyzf.bean.BaseData;
import com.fy.fyzf.bean.SignContractSearchBean;
import com.fy.fyzf.bean.SignDetailBean;
import com.fy.fyzf.bean.SignContractListBean;
import com.fy.fyzf.view.SignContractCallBack;

public class SignContractPresenter extends BasePresenter<SignContractCallBack> {
    public SignContractPresenter(SignContractCallBack view) {
        super(view);
    }

    public void getSignContractList(int page,int pageSize){
        addSubscription(mApiService.getSignContractList(page, pageSize), new SubscriberCallBack<BaseData<SignContractListBean>>(mView,true) {
            @Override
            protected void onSuccess(BaseData<SignContractListBean> response) {
                mView.getSifnContractListSuccess(response.data);
            }

            @Override
            protected void onError() {

            }
        });
    }
    public void getSignContractList1(SignContractSearchBean signContractSearchBean){
        addSubscription(mApiService.getSignContractList1(signContractSearchBean), new SubscriberCallBack<BaseData<SignContractListBean>>(mView,true) {
            @Override
            protected void onSuccess(BaseData<SignContractListBean> response) {
                mView.getSifnContractListSuccess(response.data);
            }

            @Override
            protected void onError() {

            }
        });
    }

    public void getSingnContractdetail(int id) {
        addSubscription(mApiService.getSignDetail(id), new SubscriberCallBack<BaseData<SignDetailBean>>(mView,true) {
            @Override
            protected void onSuccess(BaseData<SignDetailBean> response) {
                mView.getSingnContractdetail(response.data);
            }

            @Override
            protected void onError() {

            }
        });
    }

    public void getSignContractDetail(){

    }
}
